# -*- ecoding: utf-8 -*-
# @Author: Wick
# @Time: 2024-02-24 15:27

arr = input('请输入值：')
nums = [int(n) for n in arr.split()]
targe = int(input('请输入targe：'))

for i in range(len(nums)):
    j = i+1
    while j < len(nums):
        if nums[i] + nums[j] == targe:
            print([i,j])
        j += 1